﻿using System.Collections.Generic;
using System.Text;

namespace SimpleOrmCFPC.Core.Query.Where
{
    public class OperatorWhereElement : IWhereElement
    {
        public IEnumerable<IWhereElement> Operands { get; private set; }
        public string Op { get; private set; }

        public OperatorWhereElement(string op, IEnumerable<IWhereElement> operands)
        {
            Operands = operands;
            Op = op;

        }

        public OperatorWhereElement(string op, params IWhereElement[] operands)
        {
            Operands = operands;
            Op = op;

        }

        public void Visit(WhereToSqlBuilder visitor, StringBuilder builder, List<object> parameters)
        {
            visitor.Visit(this, builder, parameters);
        }
    }
}